package com.demo.common.controller.testinterceptor;

import com.demo.interceptor.ActionInterceptor;
import com.demo.interceptor.ControllerInterceptor;
import com.jfinal.aop.Before;
import com.jfinal.aop.ClearInterceptor;
import com.jfinal.aop.ClearLayer;
import com.jfinal.core.Controller;
/**
 * 拦截器具体测试类
 * @author xwalker
 *
 */
@Before(ControllerInterceptor.class)
public class InterceptorTestController extends Controller{
	public void index(){
		renderText("调用InterceptorTestController index 全局和Controller级别的");
	}
	@Before(ActionInterceptor.class)
	public void actiontest(){
		renderText("调用InterceptorTestController actiontest  全局、Controller、Action级别");
	}
	
	@ClearInterceptor
	public void clearcontrollerinterceptor(){
		renderText("调用InterceptorTestController clearcontrollerinterceptor 清除Controller级别 保留全局");
	}
	@ClearInterceptor(ClearLayer.ALL)
	public void clearallinterceptor(){
		renderText("调用InterceptorTestController clearallinterceptor 清除所有级别");
	}
}
